Home
PHP
Tags
PHP Tutorial
Latest Articles
English
English
简体中文
中文(繁體)
日本語
한국어
Français
Deutsch
မြန်မာဘာသာ
Current Location:
Home
>
Function Categories
>
date_sub
date_sub
DateTime::sub - Subtract a certain amount of days, months, years, hours, minutes, and seconds to a DateTime object
Name:
date_sub
Category:
Date and time
Programming Language:
php
One-line Description:
Subtract the day, month, year, hour, minute, and second from the specified date.
Related
Use date_sub function to subtract weekdays: How to avoid weekends
2
Frequently Asked Questions about the date_sub function when handling time zones
2
date_sub function: How to subtract a specified time from the current date
9
Similar Functions
date_format
date_format
AliasforDateTime::
date_date_set
date_date_set
DateTime::setDateali
date_get_last_errors
date_get_last_errors
AliasforDateTime::
idate
idate
Formatlocaltime/date
date_default_timezone_set
date_default_timezone_set
Setthedefaulttimezon
timezone_identifiers_list
timezone_identifiers_list
AliasforDateTimeZo
date_add
date_add
DateTime::addalias:A
mktime
mktime
GetaUnixtimestampfor
Popular Articles
Use date_sub function to subtract weekdays: How to avoid weekends
Frequently Asked Questions about the date_sub function when handling time zones
date_sub function: How to subtract a specified time from the current date